package cn.wolfcode.edu.mapper;

import cn.wolfcode.edu.domain.Client;
import cn.wolfcode.edu.query.ClientQueryObject;
import cn.wolfcode.edu.query.QueryObject;
import cn.wolfcode.edu.util.PageResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClientMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Client entity);

    Client selectByPrimaryKey(Long id);

    List<Client> selectAll();

    int updateByPrimaryKey(Client entity);

    /*------------高级查询两件套-----------------*/
    Integer queryForCount(QueryObject qo);
    List<Client> queryForList(QueryObject qo);
    /*-------------高级查询两件套----------------*/
    //跟进操作更新信息
    void updateByTrace(Client client);

    //将潜在客户放入资源池
    void abandon(Long id);

    //移交客户对象
    void joinMe(@Param("clientId") Long clientId,@Param("salemanId") Long salemanId);

    //列出所有资源池的数据
    List<Client> listNoSaleman(ClientQueryObject qo);
    Integer queryForCountNoSaleman(ClientQueryObject qo);

    /*更新正式学员的信息*/
    void updateForStudentEdit(Client client);

    void updateStatus2Formal(Client client);

    //设置移交历史的 移交目标
    void setTarget(@Param("salemanId") Long salemanId, @Param("clientId") Long clientId);
}